// initial state
const state = {
  navCollapse: false,
  subNavCollapse: true
}

// getters
const getters = {
  navCollapse: state => state.navCollapse,
  subNavCollapse: state => state.subNavCollapse
}

// actions
const actions = {
  collapseNav ({ commit }, isCollapse) {
    commit('collapseNav', isCollapse)
  },
  collapseSubNav ({ commit }, isCollapse) {
    commit('collapseSubNav', isCollapse)
  }
}

// mutations
const mutations = {
  collapseNav (state, isCollapse) {
    state.navCollapse = isCollapse
  },
  collapseSubNav (state, isCollapse) {
    state.subNavCollapse = isCollapse
  }
}

export default {
  state,
  getters,
  actions,
  mutations
}
